package com.zsrt.javase.c004.t02.p01;
/**
*@author jzh
*@创建时间 2017年6月13日下午8:39:59
*类说明：单例模式的双重检查锁
*/
public class Singleton2 {
	private static Singleton2 instance;
	private  Singleton2(){};
	
	public static Singleton2 getInstance(){
		if(null==instance){
			synchronized (Singleton2.class) {
				if(null==instance){
					instance=new Singleton2();
				}
			}
		}
		return instance;
	}
}
